require("../../common/vendor.js"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pagesA/pages/mallA/huodong" ], {
    3384: function(t, o, n) {
        (function(i) {
            Object.defineProperty(o, "__esModule", {
                value: !0
            }), o.default = void 0;
            var t, a = (t = n("a34a")) && t.__esModule ? t : {
                default: t
            };
            function l(t, e, o, n, a, i, r) {
                try {
                    var u = t[i](r), l = u.value;
                } catch (t) {
                    return o(t), 0;
                }
                u.done ? e(l) : Promise.resolve(l).then(n, a);
            }
            function r(u) {
                return function() {
                    var t = this, r = arguments;
                    return new Promise(function(e, o) {
                        var n = u.apply(t, r);
                        function a(t) {
                            l(n, e, o, a, i, "next", t);
                        }
                        function i(t) {
                            l(n, e, o, a, i, "throw", t);
                        }
                        a(void 0);
                    });
                };
            }
            var u = getApp(), e = {
                data: function() {
                    return {
                        warn_num: i.getStorageSync("userinfo").s_1_num,
                        module_name: u.globalData.module_name,
                        sharetitle: "",
                        waimaidaohangcurrent: 0,
                        waimaidaohang_1: [],
                        waimaidaohang_2: [],
                        waimaidaohang_3: [],
                        waimaittnew_daohang_height: 0,
                        sharepic: "",
                        appid_type: 0,
                        movietype: 1,
                        moviecometype: 1,
                        movielist: [],
                        moviecomelist: [],
                        movie_hotshuliang: 0,
                        qudao_tkl: "",
                        is_qudao_tkl: 0,
                        showAlert_taobaoauth: !1,
                        showAlert_login: !1,
                        elm_url: [],
                        meituan_url: [],
                        wxCode: "",
                        userinfo: [],
                        swiperItems: [],
                        waimaidaohang: [],
                        waimailist: [],
                        setting: [],
                        showAlert_meituan: !1,
                        kwd: "",
                        showAlert: !1,
                        currentCateIndex: 0,
                        leftTo: "cate1",
                        productListTo: "",
                        mainCate: [],
                        allProducts: [],
                        allProducts_temp: [],
                        mainHeight: 500,
                        scrollTimer: null,
                        contact_title: "",
                        contact_title_text: "",
                        contact_title_desc: "",
                        contact_id: "",
                        contact_type: "",
                        contact_thumb: "",
                        youlikes: [],
                        indexCateAndProducts: [],
                        top: 0,
                        footerCurrent: 0,
                        showToast_login: !1,
                        pageKey: 0,
                        height: "",
                        tabBar: [],
                        elmwm_act_id: 0,
                        mtpic: 0,
                        cityid: 40,
                        cityCode: 500100,
                        lat: 0,
                        lon: 0,
                        navItems: [],
                        navIndex: 0,
                        navType: "",
                        mallpage: 1,
                        mallpagesize: 20,
                        mallgoodslist: [],
                        loadStatus: "loadmore",
                        loadText: {
                            loadmore: "上拉加载更多",
                            loading: "努力加载中",
                            nomore: "实在没有了"
                        },
                        scrollTop: 0,
                        windowHeight: i.getStorageSync("windowHeight"),
                        navQuery: "",
                        background: {
                            backgroundColor: i.getStorageSync("setting").waimaittnew_lunbobgcolor
                        },
                        search_width: "",
                        isFixed: !1,
                        headerHeight: 0,
                        nav_margin_top: "0rpx",
                        nav_padding_top: "0rpx",
                        search_height: "",
                        keyword: "",
                        search_placeholder: "",
                        fixed_heiht: 0,
                        mall_nav: [],
                        api_url: 0,
                        ad_title: "",
                        ad_pic: "",
                        ad_width: "",
                        huodong_banner_color: "",
                        huodong_banner_style: ""
                    };
                },
                components: {
                    gracePage: function() {
                        n.e("graceUI/components/gracePage").then(function() {
                            return resolve(n("1021"));
                        }.bind(null, n)).catch(n.oe);
                    }
                },
                props: {},
                onReady: function() {
                    var e = this;
                    return r(a.default.mark(function t() {
                        return a.default.wrap(function(t) {
                            for (;;) switch (t.prev = t.next) {
                              case 0:
                                return t.next = 2, e.$onLaunched;

                              case 2:
                              case "end":
                                return t.stop();
                            }
                        }, t);
                    }))();
                },
                onReachBottom: function() {
                    "nomore" != this.loadStatus && this.loadMallapigoodslist();
                },
                onShareAppMessage: function() {
                    var t = "pagesA/pages/mallA/huodong?uid=" + i.getStorageSync("userinfo").user_id + "&id=" + this.api_url;
                    return {
                        title: this.ad_title,
                        imageUrl: this.ad_pic,
                        path: t
                    };
                },
                onShow: function(t) {
                    var e = this;
                    return r(a.default.mark(function t() {
                        return a.default.wrap(function(t) {
                            for (;;) switch (t.prev = t.next) {
                              case 0:
                                return t.next = 2, e.$onLaunched;

                              case 2:
                                e.windowHeight = i.getStorageSync("windowHeight");

                              case 4:
                              case "end":
                                return t.stop();
                            }
                        }, t);
                    }))();
                },
                onPullDownRefresh: function() {},
                onPageScroll: function(t) {
                    this.scrollTop = t.scrollTop;
                },
                onLoad: function(o) {
                    var n = this;
                    return r(a.default.mark(function t() {
                        var e;
                        return a.default.wrap(function(t) {
                            for (;;) switch (t.prev = t.next) {
                              case 0:
                                return t.next = 2, n.$onLaunched;

                              case 2:
                                i.showLoading({
                                    title: "加载中...",
                                    mask: !1
                                }), (e = n).setting = i.getStorageSync("setting"), e.userinfo = i.getStorageSync("userinfo"), 
                                e.huodong_goodslist = i.getStorageSync("huodong_goodslist"), e.huodong_banner_color = e.setting.waimaittnew_lunbobgcolor, 
                                e.api_url = o.id, e.loadMallapigoodslist();

                              case 12:
                              case "end":
                                return t.stop();
                            }
                        }, t);
                    }))();
                },
                methods: {
                    openGoods: function(t) {
                        "youxuan" == t.currentTarget.dataset.pingtai ? i.navigateToMiniProgram({
                            appId: t.currentTarget.dataset.appid,
                            path: t.currentTarget.dataset.path
                        }) : i.navigateTo({
                            url: "detail?pt=" + t.currentTarget.dataset.pingtai + "&goodsid=" + t.currentTarget.dataset.goodsid + "&goodssign=" + t.currentTarget.dataset.goodssign + "&search_id=" + t.currentTarget.dataset.search_id
                        });
                    },
                    showDialog1: function() {
                        this.$refs.showAlert_taobaoauth.open();
                    },
                    closeDialog1: function() {
                        this.$refs.showAlert_taobaoauth.hide();
                    },
                    showDialog2: function() {
                        this.$refs.showAlert_login.open();
                    },
                    closeDialog2: function() {
                        this.$refs.showAlert_login.hide();
                    },
                    showDialog3: function() {
                        this.$refs.showAlert.open();
                    },
                    closeDialog3: function() {
                        this.$refs.showAlert.hide();
                    },
                    userlogin: function() {
                        !i.getStorageSync("userinfo").nickname && 1 == i.getStorageSync("setting").login_type && wx.getUserProfile ? this.showDialog2() : this.closeDialog2();
                    },
                    getWxCode: function() {
                        var e = this;
                        wx.login({
                            success: function(t) {
                                e.wxCode = t.code;
                            }
                        });
                    },
                    login: function(e) {
                        var o = this;
                        this.closeDialog2(), i.getSetting({
                            success: function(t) {
                                t.authSetting["scope.userInfo"] ? i.getUserInfo({
                                    success: function(t) {
                                        o.userAuth(e, t.userInfo, "login");
                                    }
                                }) : o.userAuth(e, null, "login");
                            }
                        });
                    },
                    getUserProfile: function() {
                        var o = this;
                        wx.getUserProfile({
                            desc: "请完善会员资料",
                            success: function(t) {
                                console.log(t.userInfo);
                                var e = u.globalData.util.url("entry/wxapp/userinfo2", {
                                    m: u.globalData.module_name
                                }), t = {
                                    avatarUrl: t.userInfo.avatarUrl,
                                    nickName: t.userInfo.nickName,
                                    openid: i.getStorageSync("openid")
                                };
                                i.request({
                                    url: e,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: t,
                                    success: function(t) {
                                        1 == t.data.status && (i.setStorageSync("userinfo", t.data.data.userinfo), o.userinfo = t.data.data.userinfo, 
                                        o.closeDialog2(), i.showToast({
                                            title: "登录成功",
                                            icon: "none"
                                        }));
                                    }
                                });
                            }
                        });
                    },
                    userAuth: function(o, t, n) {
                        var a = this;
                        "getUserInfo:ok" == o.detail.errMsg && wx.login({
                            success: function(t) {
                                var e = u.globalData.util.url("entry/wxapp/api", {
                                    m: u.globalData.module_name,
                                    o: "userinfo"
                                }), t = {
                                    code: t.code,
                                    encryptedData: o.detail.encryptedData,
                                    iv: o.detail.iv,
                                    openid: i.getStorageSync("openid"),
                                    invite_uid: wx.getStorageSync("invite_uid")
                                };
                                i.request({
                                    url: e,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: t,
                                    success: function(t) {
                                        var e;
                                        1 == ret.data.status && (e = u.globalData.crypt.Decrypt(ret.data.data.data, ret.data.data.key), 
                                        e = JSON.parse(e), i.setStorageSync("userinfo", e.userinfo), a.userinfo = e.userinfo, 
                                        "login" == n && (a.closeDialog2(), i.showToast({
                                            title: "登录成功",
                                            icon: "none"
                                        })));
                                    }
                                });
                            }
                        });
                    },
                    closeAlert: function() {
                        this.closeDialog2();
                    },
                    loadMallapigoodslist: function() {
                        var o, t;
                        "nomore" != this.loadStatus ? ((o = this).loadStatus = "loading", t = u.globalData.util.url("entry/wxapp/mallapigoodslist", {
                            m: u.globalData.module_name
                        }), i.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: i.getStorageSync("openid"),
                                page: o.mallpage,
                                pagesize: o.mallpagesize,
                                lon: i.getStorageSync("lon"),
                                lat: i.getStorageSync("lat"),
                                id: o.api_url,
                                system_type: i.getStorageSync("systemtype")
                            },
                            success: function(t) {
                                var e;
                                200 == t.data.code && (i.setNavigationBarColor({
                                    backgroundColor: t.data.banner_color,
                                    frontColor: "#ffffff"
                                }), i.setNavigationBarTitle({
                                    title: t.data.title
                                }), o.ad_title = t.data.title, o.ad_pic = t.data.thumb, o.ad_width = t.data.width, 
                                o.huodong_banner_color = t.data.banner_color, e = t.data.mallgoodslist, 1 == t.data.has_more ? o.loadStatus = "loadmore" : o.loadStatus = "nomore", 
                                o.mallpage = t.data.page, 1 == o.mallpage ? (o.mallpagesize = t.data.pagesize, o.mallgoodslist = [], 
                                o.mallgoodslist = e) : e && (o.mallgoodslist = o.mallgoodslist.concat(e)), o.mallpage++), 
                                i.hideLoading();
                            }
                        })) : i.hideLoading();
                    }
                }
            };
            o.default = e;
        }).call(this, n("543d").default);
    },
    "39dd": function(t, e, o) {
        o.r(e);
        var n, a = o("3384"), i = o.n(a);
        for (n in a) "default" !== n && function(t) {
            o.d(e, t, function() {
                return a[t];
            });
        }(n);
        e.default = i.a;
    },
    "68a6": function(t, e, o) {},
    "6b55": function(t, e, o) {
        o.r(e);
        var n, a = o("82bc"), i = o("39dd");
        for (n in i) "default" !== n && function(t) {
            o.d(e, t, function() {
                return i[t];
            });
        }(n);
        o("c844");
        var r = o("f0c5"), a = Object(r.a)(i.default, a.b, a.c, !1, null, null, null, !1, a.a, void 0);
        e.default = a.exports;
    },
    "82bc": function(t, e, o) {
        o.d(e, "b", function() {
            return a;
        }), o.d(e, "c", function() {
            return i;
        }), o.d(e, "a", function() {
            return n;
        });
        var n = {
            uImage: function() {
                return o.e("uview-ui/components/u-image/u-image").then(o.bind(null, "871d"));
            },
            uLoading: function() {
                return o.e("uview-ui/components/u-loading/u-loading").then(o.bind(null, "54b5"));
            },
            uIcon: function() {
                return o.e("uview-ui/components/u-icon/u-icon").then(o.bind(null, "bee6"));
            },
            uGap: function() {
                return o.e("uview-ui/components/u-gap/u-gap").then(o.bind(null, "130d"));
            },
            uEmpty: function() {
                return o.e("uview-ui/components/u-empty/u-empty").then(o.bind(null, "b399"));
            },
            uButton: function() {
                return o.e("uview-ui/components/u-button/u-button").then(o.bind(null, "cad8"));
            },
            uLoadmore: function() {
                return o.e("uview-ui/components/u-loadmore/u-loadmore").then(o.bind(null, "2220"));
            },
            uBackTop: function() {
                return o.e("uview-ui/components/u-back-top/u-back-top").then(o.bind(null, "feb3"));
            }
        }, a = function() {
            this.$createElement;
            this._self._c;
        }, i = [];
    },
    a32b: function(t, e, o) {
        (function(t) {
            function e(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            o("0cda"), e(o("66fd")), t(e(o("6b55")).default);
        }).call(this, o("543d").createPage);
    },
    c844: function(t, e, o) {
        var n = o("68a6");
        o.n(n).a;
    }
}, [ [ "a32b", "common/runtime", "common/vendor" ] ] ]);